//
// Created by hujin on 2023/3/7.
//

#ifndef SI_OBJECTIVES_H
#define SI_OBJECTIVES_H
#include <cosi/node_stats.h>



// e represents p_ij + p_ji
template <typename T> class Objectives{
    inline static T merge(NodeStatL2<T>&, NodeStatL2<T>&, T e);
    inline static T merge(NodeStatL3<T>&, NodeStatL3<T>&, T e);
//    T merge(T vol_a1, T vol_a2, T p_a1, T p_a2, T e, T v_gamma);
//    T combine(T vol_a1, T vol_a2, T p_a1, T p_a2, T pi_a1, T pi_a2, T e);
    inline static T lift(NodeStatL2<T>& , NodeStatL2<T>& , T e);
    inline static T lift(NodeStatL3<T>& , NodeStatL3<T>& , T e);


    inline static T swap(NodeStatL2<T>& s, NodeStatL2<T>& t, NodeStatL2<T>& leaf, T e_sc, T e_ct);
    inline static T swap(NodeStatL3<T>& s, NodeStatL3<T>& t, NodeStatL3<T>& child, T e_st, T e_ct);

};





//template <typename T> class Updating{
//    T merge(NodeStatL2<T>&t1, NodeStatL2<T> &t2, T e);
//    T merge(NodeStatL3<T>&t1, NodeStatL3<T> &t2, T e);
//
//};
#endif //SI_OBJECTIVES_H
